package org.mobiletrain.day08_listviewdemo02.utils;

import java.util.List;
import java.util.Map;

import org.mobiletrain.day08_listviewdemo02.MainActivity;

import android.os.AsyncTask;

public class MyAsyncTask extends AsyncTask<String, Void, List<Map<String, String>>> {

	@Override
	protected List<Map<String, String>> doInBackground(String... params) {
		String url = params[0];
		String xml = MyUtils.getJsonFromUrl(url);
		List<Map<String, String>> list = XMLParser.parseXML(xml);
		return list;
	}

	@Override
	protected void onPostExecute(List<Map<String, String>> result) {
		super.onPostExecute(result);
		MainActivity.callback.getXML(result);
	}

}
